package com.hsylient.javase.chapter02.demo01.demo05;

/**
 * 父类的构造方法中打印输出了一句话，验证在父类构造方法被调用的时候会执行
 */
public class Father {
    private String name;

    public Father() {
        System.out.println("父类的构造方法执行。。。");
    }

    public Father(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
